package com.ocom.common.enums;

public enum OpTypeEnum {
    card("刷卡", 1), paymentCode("付款码", 2), mainSweep("主扫", 4),
    coupon("优惠卷", 6),order("订餐", 9),cash("现金", 11)
    ,onLine("线上", 12),subsidy("补贴", 15),code("码", 21)
    ,humanFace("刷人脸", 22),staticCode("设备收款码", 24),frictionRidge("掌纹", 25),jkRecharge("接口充值", 14);
    // 成员变量
    private String name;
    private int index;
    // 构造方法
    private OpTypeEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }
    // 普通方法
    public static String getName(int index) {
        for (OpTypeEnum c : OpTypeEnum.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getIndex() {
        return index;
    }
    public void setIndex(int index) {
        this.index = index;
    }
}
